/*
 * Copyright 2019-2025 the original author or authors.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * https://www.apache.org/licenses/LICENSE-2.0
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.iiifi.kite.core.model;

import java.io.Serializable;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * KiteAccount
 *
 * @author kite@iiifi.com 花朝
 */
@Data
@ApiModel(description = "KiteAccount")
public class KiteAccount implements Serializable {

    @ApiModelProperty("账号id")
    private Long id;

    @ApiModelProperty("昵称")
    private String nickname;

    @ApiModelProperty("姓名")
    private String name;

    @ApiModelProperty("头像")
    private String avatar;

    @ApiModelProperty("邮箱")
    private String email;

    @ApiModelProperty("角色信息")
    private List<Role> roles;

    @ApiModelProperty(value = "权限信息")
    private Set<String> permissions = new HashSet<>();

    @Data
    public static class Role {

        @ApiModelProperty("角色id")
        private Long id;

        @ApiModelProperty("角色编码")
        private String code;

        @ApiModelProperty("角色名称")
        private String name;
    }
}
